<div class="container">
    <div class="row" style="padding:2em 0">
        <div class="col-md-2">
            <button class="btn btn-error"  onclick="narn('log')">默认（log）</button>
        </div>
        <div class="col-md-2"><button class="btn btn-success" onClick="narn('success')">成功（success）</button></div>
        <div class="col-md-2"><button class="btn btn-warning"  onclick="narn('warn')">警告（warn）</button></div>
        <div class="col-md-2"><button class="btn btn-danger"  onclick="narn('error')">危险（error）</button></div>
    </div>
</div>

<script type="text/javascript">
    function narn (type) {
        naranja()[type]({
            title: '新消息提示',
            text: '单击“接受”以创建新通知',
            timeout: 'keep',
            buttons: [{
                text: '接受',
                click: function (e) {
                    naranja().success({
                        title: '通知',
                        text: '通知被接受'
                    })
                }
            },{
                text: '取消',
                click: function (e) {
                    e.closeNotification()
                }
            }]
        })
    }
</script>
